package fr.vahren.sriksal.dao.impl;

import java.sql.Types;

import org.springframework.jdbc.core.support.JdbcDaoSupport;

import fr.vahren.sriksal.dao.IPlayerDao;

public class PlayerDao extends JdbcDaoSupport implements IPlayerDao {

	private static final String REQ_INSERT_ASSOC = "INSERT INTO PLAYER (ID_MAP, ID_USER) VALUES (?,?)";

	@Override
	public void associateMapWithPlayer(long mapId, long userId) {

		getJdbcTemplate().update(REQ_INSERT_ASSOC,
				new Object[] { mapId, userId },
				new int[] { Types.INTEGER, Types.INTEGER });

	}

}
